package cn.jhz.learn.blog.test.core;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.jhz.learn.blog.common.bean.JsonData;

@RestController
@RequestMapping("/{blog_id}")
public class BloggerController {
	
	@PostMapping("/article/category")
	public JsonData saveArticleCategory(@PathVariable("blog_id") String blogId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@PostMapping("/abum")
	public JsonData saveAbum(@PathVariable("blog_id") String blogId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@DeleteMapping("/article/category/{category_id}")
	public JsonData deleteArticleCategory(@PathVariable("blog_id") String blogId, @PathVariable("category_id") Integer categoryId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@DeleteMapping("/abum/{abum_id}")
	public JsonData deleteAbum(@PathVariable("blog_id") String blogId, @PathVariable("abum_id") Integer abumId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@PutMapping("/article/category")
	public JsonData updateArticleCategory(@PathVariable("blog_id") String blogId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@PutMapping("/abum")
	public JsonData updateAbum(@PathVariable("blog_id") String blogId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@PutMapping
	public JsonData updateBlog(@PathVariable("blog_id") String blogId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@GetMapping("/article/category/all")
	public JsonData getArticleCategoryList(@PathVariable("blog_id") String blogId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@GetMapping("/abum/all")
	public JsonData getAbumList(@PathVariable("blog_id") String blogId) {
		return JsonData.success();
	}
	
	@GetMapping("/article/category/{category_id}")
	public JsonData getAbum(@PathVariable("blog_id") String blogId, @PathVariable("category_id") Integer categoryId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@GetMapping("/abum/{abum_id}")
	public JsonData getArticleCategory(@PathVariable("blog_id") String blogId, @PathVariable("abum_id") Integer abumId) {
		//TODO:待设计VO
		return JsonData.success();
	}
}
